﻿<%@ Page Language="C#" MasterPageFile="~/Org/MasterPage.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="frmO_EmpDivisionInput.aspx.cs" Inherits="Org_frmO_EmpDivisionInput" Title="所属情報登録" Culture="ja-JP" uiCulture="ja" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
所属情報登録
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript" src="../Js/jquery.min.js"></script>
<script src="../js/jquery.blockUI.js" type="text/javascript"></script>
<script src="../js/Validation.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function() {
		startup();
	});

	function startup() {
		disableControlOnLoadUpdatePanel("", "");
	
		$('#ctl00_ContentPlaceHolder1_ddl_兼務').focus();

		registerControlToValidation("validation");

		formatDate("css_textbox_Calendar", "/");

		registerEnterEvent("css_font_textbox", "<%= btn登録.ClientID %>", 6);
	}

    function CheckDate発令開始日(oSrc, args) {
        if (args.Value != "") {
        	var Valid = checkDate(args.Value);
        	if (Valid == true) {
        		args.IsValid = checkYearOld(args.Value, getNowDate(new Date()), 0, "<=");
        	}
        	ValidatorEnable2(document.getElementById("<%= CustomValidator発令開始日1.ClientID %>"), true);
        }
    }

    function CheckIsDate発令開始日(oSrc, args) {
        if (args.Value != "") {
            args.IsValid = checkDate(args.Value);
        }
    }

    function CheckDate発令終了日(oSrc, args) {
        if (args.Value != "") {
            var Valid = checkDate(args.Value);
            if (Valid == true) {
                args.IsValid = checkYearOld($('#ctl00_ContentPlaceHolder1_txt_発令開始日').val(), args.Value, 0, "<=");
            }
            ValidatorEnable2(document.getElementById("<%= CustomValidator発令終了日1.ClientID %>"), true);
        }
    }

    function CheckIsDate発令終了日(oSrc, args) {
        if (args.Value != "") {
            args.IsValid = checkDate(args.Value);
        }
    }

</script>
<style type="text/css">
    .css_font_textbox
    {
    	font-family: MS UI Gothic;
        font-size: 11pt;
    }
    .invalid
    {
        background-color: #E6EDCC;
    }
    .btn_next 
    {
		width: 510px;
	}
</style>
<div class="maindiv1">
	<asp:UpdatePanel ID="UpdatePanel1" runat="server">
		<Triggers>
			<asp:AsyncPostBackTrigger ControlID="btn登録" />
		</Triggers>
	<ContentTemplate>

    <div class="Header1">＊: 必須. </div>
    <div class="NoteStyle">
        <span>
        ※下記の情報があれば、必須項目を入力してください。なければ、次ボタンを押してください。
        </span>
    </div>
    <div>&nbsp;</div>
    <div class="detail-admin-row">
        <span class="detail-admin-label">兼務区分 :</span>
        <asp:DropDownList ID="ddl_兼務" runat="server" CssClass="css_font_textbox dropdownlist width2 validation">
        <asp:ListItem Value="-1" selected="true">[選択]</asp:ListItem>
        </asp:DropDownList>
        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator兼務"
                    ControlToValidate="ddl_兼務"
                    Display="None"
                    ErrorMessage="0.0" 
                    InitialValue = "-1"
                    SetFocusOnError="False"/>
        <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender1"
                    TargetControlID="RequiredFieldValidator兼務" 
                    HighlightCssClass="invalid" Width="240px"
                    CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
        <span class="required-field">*</span>
    </div>
    <div class="detail-admin-row">
        <span class="detail-admin-label">部門名 :</span>
        <asp:DropDownList ID="ddl_部門名" runat="server" CssClass="css_font_textbox dropdownlist width2"><asp:ListItem Value="-1" selected="true">[選択]</asp:ListItem>
        </asp:DropDownList>
        <%--<span class="required-field"> *</span>--%>
    </div>
    <div class="detail-admin-row">
        <span class="detail-admin-label">役職 :</span>
        <asp:DropDownList ID="ddl_役職" runat="server" CssClass="css_font_textbox dropdownlist width2">
        <asp:ListItem Value="-1" selected="true">[選択]</asp:ListItem>
        </asp:DropDownList>
        <%--<span class="required-field"> *</span>--%>
    </div>
    <div class="detail-admin-row">
        <span class="detail-admin-label">発令開始日 :</span>
        <asp:TextBox ID="txt_発令開始日" runat="server" MaxLength="8" onkeypress="return InputNumberKeys(this, event)" CssClass="css_font_textbox css_textbox_Calendar validation textbox width_calendar"/>
        <asp:ImageButton ID="ImageButton1" runat="server" CssClass="btn_calendar"  ImageUrl="~/Images/calendar.jpg" ValidationGroup="detailForm" />
        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="ImageButton1" TargetControlID="txt_発令開始日" Format="yyyy/MM/dd"> </ajaxToolkit:CalendarExtender>    
                <asp:CustomValidator ID= "CustomValidator発令開始日" runat="server" 
                    ControlToValidate="txt_発令開始日" 
                    ClientValidationFunction= "CheckDate発令開始日"
                    ErrorMessage="1.0" 
                    Display ="None" 
                    SetFocusOnError="False" ValidateEmptyText="True" />
                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender5"
                    TargetControlID="CustomValidator発令開始日" 
                    HighlightCssClass="invalid" Width="240px"
                    CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
                <asp:CustomValidator ID= "CustomValidator発令開始日1" runat="server" 
                    ControlToValidate="txt_発令開始日" 
                    ClientValidationFunction= "CheckIsDate発令開始日"
                    ErrorMessage="1.1" 
                    Display ="None" 
                    SetFocusOnError="False" ValidateEmptyText="True" />
                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender18"
                    TargetControlID="CustomValidator発令開始日1" 
                    HighlightCssClass="invalid1" Width="210px"
                    CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator発令開始日"
                    ControlToValidate="txt_発令開始日"
                    Display="None"
                    ErrorMessage="1.2" 
                    SetFocusOnError="False" />
                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender19"
                        TargetControlID="RequiredFieldValidator発令開始日" 
                        HighlightCssClass="invalid2" Width="240px"
                        CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png"/>
        <span class="required-field">*</span>
    </div>   
    <div class="detail-admin-row">
        <span class="detail-admin-label">発令終了日 :</span>
        <asp:TextBox ID="txt_発令終了日" runat="server" MaxLength="8" onkeypress="return InputNumberKeys(this, event)" CssClass="css_font_textbox css_textbox_Calendar validation textbox width_calendar"/>
        <asp:ImageButton ID="ImageButton2" runat="server" CssClass="btn_calendar"  ImageUrl="~/Images/calendar.jpg" ValidationGroup="detailForm" />
        <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" PopupButtonID="ImageButton2" TargetControlID="txt_発令終了日" Format="yyyy/MM/dd"> </ajaxToolkit:CalendarExtender>    
         <asp:CustomValidator ID= "CustomValidator発令終了日" runat="server" 
                    ControlToValidate="txt_発令終了日" 
                    ClientValidationFunction="CheckDate発令終了日" 
                    ErrorMessage="2.0" 
                    Display ="None" SetFocusOnError="False" ValidateEmptyText="True" />
                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender8"
                    TargetControlID="CustomValidator発令終了日" 
                    HighlightCssClass="invalid" Width="240px"
                    CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
                <asp:CustomValidator ID= "CustomValidator発令終了日1" runat="server" 
                    ControlToValidate="txt_発令終了日" 
                    ClientValidationFunction="CheckIsDate発令終了日" 
                    ErrorMessage="2.1" 
                    Display ="None" SetFocusOnError="False" ValidateEmptyText="True" />
                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender14"
                    TargetControlID="CustomValidator発令終了日1" 
                    HighlightCssClass="invalid1" Width="210px"
                    CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
        <%--<span class="required-field"> *</span>--%>
    </div>
    <div class="detail-admin-row">
        <span class="detail-admin-label">勤務地 :</span>  
        <asp:TextBox ID="txt_勤務地" runat="server" MaxLength="500" CssClass="css_font_textbox validation textbox width4"></asp:TextBox> 
        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator勤務地"
                    ControlToValidate="txt_勤務地"
                    Display="None"
                    SetFocusOnError="False"
                    ErrorMessage="3.0" />
                 <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender3"
                    TargetControlID="RequiredFieldValidator勤務地" 
                    HighlightCssClass="invalid" Width="240px"
                    CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />    
                     
        <span class="required-field">*</span>
        
</div>
 <br />
    <div class="detail-admin-row">
        <span class="detail-admin-label">&nbsp;</span>
        <asp:Button ID="btn登録" runat="server" Text="登録" CssClass="btn" onclick="btn登録_Click" OnClientClick="javascript:focusToControlErr();"/>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnリセット" runat="server" Text="リセット" CssClass="btn"  ValidationGroup="detailForm" onclick="btnリセット_Click" /> 
    </div>
<br />
<br />
<br />
<br />
<br />  
	<div class="detail-admin-row">
         <div class="btn_back">
                <asp:Button ID="btn_戻る"  runat="server" Text="←戻る" OnClick="btn_戻る_Click" CssClass="btn" ValidationGroup="detailForm" />
             </div>
         <div class="btn_next">
                 <asp:Button ID="btn_次"  runat="server" Text="次→" OnClick="btn_次_Click" CssClass="btn" ValidationGroup="detailForm"  />
             </div>
    </div>
	<div>&nbsp;</div>
<br /> 
</ContentTemplate>
</asp:UpdatePanel>  
</div>
</asp:Content>

